@(view: Integer, paymentList: List[Payment])(implicit lang: Lang)

@import helper._

@main("The Cult Cinema Inc. Movie"){

	<section style="padding-top:60px">
		<div class="row">
			<div class="span12">
				<ul class="breadcrumb">
					<li><a href="@routes.Application.index(lang.code)">@Messages("home")(lang)</a> <span class="divider">/</span></li>
	       			<li class="active">@Messages("staff.authenticate")(lang)</li>
	       		</ul>
			</div>
		</div>


		<div class="row">
			<div class="span12">
				<div class="row"><div class="span12 well">

					<ul class="nav nav-tabs">
						<li @if(view==1){class="active"}><a href="@routes.Staff.refund(1,lang.code)">@Messages("staff.refund.pending")(lang)</a></li>
						<li @if(view==2){class="active"}><a href="@routes.Staff.refund(2,lang.code)">@Messages("staff.refund.approved")(lang)</a></li>
						<li @if(view==3){class="active"}><a href="@routes.Staff.refund(3,lang.code)">@Messages("staff.refund.rejectd")(lang)</a></li>
					</ul>

					@if(paymentList.size()>0){
						<table class="table table-bordered table-striped table-hover">
							<thead>
								<tr>
									<th>@Messages("username")(lang)</th>
									<th>@Messages("transaction.time")(lang)</th>
									<th>@Messages("staff.movie.sessionID")(lang)</th>
									<th>@Messages("transaction.movie")(lang)</th>
									<th>@Messages("transaction.showtime")(lang)</th>
									<th>@Messages("transaction.house")(lang)</th>
									<th>@Messages("transaction.seat")(lang)</th>
									<th>@Messages("transaction.price")(lang)</th>
									@if(view==1){
										<th>@Messages("staff.refund.approve")(lang)</th>
										<th>@Messages("staff.refund.reject")(lang)</th>
									}
								</tr>
							</thead>
							<tbody>
								@paymentList.map { payment =>
									<tr>
										<td>@payment.user.username</td>
										<td>@payment.paid_time.format("dd/MM/yyyy hh:mm aaa")</td>
										<td>@payment.session.id</td>
										<td>@payment.session.movie.infos.get(0).name</td>
										<td>@payment.session.showtime.format("dd/MM/yyyy hh:mm aaa")</td>
										<td>@payment.session.house.id</td>
										<td>@payment.seat_no</td>
										<td>$@payment.session.price</td>
										@if(view==1){
											<td><a href="@routes.Staff.authenticateRefund(payment.id,2,lang.code)" class="btn btn-block btn-small btn-success"><i class="icon-ok"></i> @Messages("staff.refund.approve")(lang)</a></td>
											<td><a href="@routes.Staff.authenticateRefund(payment.id,3,lang.code)" class="btn btn-block btn-small btn-danger"><i class="icon-remove"></i> @Messages("staff.refund.reject")(lang)</a></td>
										}
									</tr>
								}
							</tbody>
						</table>
					} else {
						<p class="unavailable" >@Messages("transaction.noItem")(lang)</p>
					}
				</div></div>




			</div>
		</div>
  	</section>



}(lang)
